//
//  TestTrack.h
//  Racing
//
//  Created by vy phan on 4/14/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "cocos2d.h"
#import "CCDrawingPrimitives.h"
#import "CGPointExtension.h"
#import "Track.h"
#import "Section.h"
#import "Race.h"
#import "Rectangle.h"
#import "CGDrawing.h"
#import "CCTouchHandler.h"

@interface TestTrack : CCLayer{
	Race* race;
	Vehicle *vehicle;
	NSMutableArray* vehicles;
	Track *track;
	int maxPosX;
	int maxPosY;
	
	CGPoint oldPoint;
	BOOL	inside;
	
	CGDrawing *drawing;
	
	UIImage* DrawingImage;
	CGContextRef DrawingBitmap;
	CCSprite* DrawingSprite;
	CCTexture2D* DrawingTexture; 
	
	CCSprite* vehicleSprite;
	CGContextRef vehicleBitmap;
}
-(void) reset;
-(void) paintTrack;
-(void) drawContextLine;

-(void)SwapTexture;
-(void)DrawFilledPath;
CGContextRef CreateDrawingBitmapContext(int pixelsWide, int pixelsHigh);

@end
